3.1.30 \(\int \frac {\cos ^3(x)}{a+b \cos ^2(x)} \, dx\) [30]

Optimal. Leaf size=38 \[ -\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b}}+\frac {\sin (x)}{b} \]

[Out]

sin(x)/b-a*arctanh(sin(x)*b^(1/2)/(a+b)^(1/2))/b^(3/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3265, 396, 214} \begin {gather*} \frac {\sin (x)}{b}-\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3/(a + b*Cos[x]^2),x]

[Out]

-((a*ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]])/(b^(3/2)*Sqrt[a + b])) + Sin[x]/b

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\cos ^3(x)}{a+b \cos ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1-x^2}{a+b-b x^2} \, dx,x,\sin (x)\right )\\ &=\frac {\sin (x)}{b}-\frac {a \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\sin (x)\right )}{b}\\ &=-\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b}}+\frac {\sin (x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 38, normalized size = 1.00 \begin {gather*} -\frac {a \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b}}+\frac {\sin (x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3/(a + b*Cos[x]^2),x]

[Out]

-((a*ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]])/(b^(3/2)*Sqrt[a + b])) + Sin[x]/b

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 33, normalized size = 0.87

method result size
default \(\frac {\sin \left (x \right )}{b}-\frac {a \arctanh \left (\frac {b \sin \left (x \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b \sqrt {\left (a +b \right ) b}}\) \(33\)
risch \(-\frac {i {\mathrm e}^{i x}}{2 b}+\frac {i {\mathrm e}^{-i x}}{2 b}+\frac {a \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i x}}{\sqrt {a b +b^{2}}}-1\right )}{2 \sqrt {a b +b^{2}}\, b}-\frac {a \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i x}}{\sqrt {a b +b^{2}}}-1\right )}{2 \sqrt {a b +b^{2}}\, b}\) \(110\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(a+b*cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

sin(x)/b-1/b*a/((a+b)*b)^(1/2)*arctanh(b*sin(x)/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.47, size = 50, normalized size = 1.32 \begin {gather*} \frac {a \log \left (\frac {b \sin \left (x\right ) - \sqrt {{\left (a + b\right )} b}}{b \sin \left (x\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} b} + \frac {\sin \left (x\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

1/2*a*log((b*sin(x) - sqrt((a + b)*b))/(b*sin(x) + sqrt((a + b)*b)))/(sqrt((a + b)*b)*b) + sin(x)/b

________________________________________________________________________________________

Fricas [A]
time = 0.44, size = 134, normalized size = 3.53 \begin {gather*} \left [\frac {\sqrt {a b + b^{2}} a \log \left (-\frac {b \cos \left (x\right )^{2} + 2 \, \sqrt {a b + b^{2}} \sin \left (x\right ) - a - 2 \, b}{b \cos \left (x\right )^{2} + a}\right ) + 2 \, {\left (a b + b^{2}\right )} \sin \left (x\right )}{2 \, {\left (a b^{2} + b^{3}\right )}}, \frac {\sqrt {-a b - b^{2}} a \arctan \left (\frac {\sqrt {-a b - b^{2}} \sin \left (x\right )}{a + b}\right ) + {\left (a b + b^{2}\right )} \sin \left (x\right )}{a b^{2} + b^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[1/2*(sqrt(a*b + b^2)*a*log(-(b*cos(x)^2 + 2*sqrt(a*b + b^2)*sin(x) - a - 2*b)/(b*cos(x)^2 + a)) + 2*(a*b + b^
2)*sin(x))/(a*b^2 + b^3), (sqrt(-a*b - b^2)*a*arctan(sqrt(-a*b - b^2)*sin(x)/(a + b)) + (a*b + b^2)*sin(x))/(a
*b^2 + b^3)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 41, normalized size = 1.08 \begin {gather*} \frac {a \arctan \left (\frac {b \sin \left (x\right )}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b} + \frac {\sin \left (x\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

a*arctan(b*sin(x)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*b) + sin(x)/b

________________________________________________________________________________________

Mupad [B]
time = 0.10, size = 30, normalized size = 0.79 \begin {gather*} \frac {\sin \left (x\right )}{b}-\frac {a\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\sin \left (x\right )}{\sqrt {a+b}}\right )}{b^{3/2}\,\sqrt {a+b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(a + b*cos(x)^2),x)

[Out]

sin(x)/b - (a*atanh((b^(1/2)*sin(x))/(a + b)^(1/2)))/(b^(3/2)*(a + b)^(1/2))

________________________________________________________________________________________